package learn.emp02.ex31;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        if (scanner.hasNextDouble() && scanner.hasNextDouble() && scanner.hasNextDouble()) {
            double a = scanner.nextDouble();
            double b = scanner.nextDouble();
            double c = scanner.nextDouble();
            if (a >= 1 && a <= 200 && b >= 1 && b <= 200 && c >= 1 && c <= 200) {
                if (a + b > c && a + c > b && b + c > a) {
                    if (a == b && b == c) {
                        System.out.println("Equilateral triangle");
                    } else if (a == b || b == c || a == c) {
                        if (Math.pow(a, 2) + Math.pow(b, 2) == Math.pow(c, 2) ||
                                Math.pow(a, 2) + Math.pow(c, 2) == Math.pow(b, 2) ||
                                Math.pow(b, 2) + Math.pow(c, 2) == Math.pow(a, 2)) {
                            System.out.println("Isosceles right-angled triangle");
                        } else {
                            System.out.println("Isosceles triangle");
                        }
                    } else if (Math.pow(a, 2) + Math.pow(b, 2) == Math.pow(c, 2) ||
                            Math.pow(a, 2) + Math.pow(c, 2) == Math.pow(b, 2) ||
                            Math.pow(b, 2) + Math.pow(c, 2) == Math.pow(a, 2)) {
                        System.out.println("Right-angled triangle");
                    } else {
                        System.out.println("General triangle");
                    }
                } else {
                    System.out.println("Not a triangle");
                }
            } else {
                System.out.println("Wrong Format");
            }
        }
        scanner.close();
    }
}